// 组织架构 的接口请求
import request from '@/utils/request'

// 查询列表
export const getDepartmentListApi = () =>
  request({
    url: '/company/department',
    method: 'GET'
  })
// 查询单个
export const getDepartmentInfoApi = (id) =>
  request({
    url: '/company/department/' + id,
    method: 'GET'
  })

// 增
export const addDepartmentApi = (data) =>
  request({
    url: '/company/department',
    method: 'POST',
    data
  })

// 改
export const editDepartmentApi = (data) =>
  request({
    url: '/company/department/' + data.id,
    method: 'PUT',
    data
  })

// 删
export const delDepartmentApi = (id) =>
  request({
    url: '/company/department/' + id,
    method: 'DELETE'
  })
